package FIT::Runner::Options;

use FIT::Class;
use FindBin;
use aliased 'FIT::Document';

with 'Config::System::MooseX::Getopt';
  
has in  => (is => 'ro', isa => 'Str', required => 1);
has out => (is => 'ro', isa => 'Str', required => 1);

coerce 'FIT::Runner::Options'
    => from 'HashRef'
    => via { __PACKAGE__->new(%$_) };

sub make_document {
    return Document->new(
        in  => $self->in,
        out => $self->out,
    );
}

=head1 NAME

FIT::Runner::Options - FIT runner command line options


=head1 SYNOPSIS

    use aliased 'FIT::Runner::Options';

    # direct options
    $options = Options->new(in => 'in.html', out => 'out');

    # or else from CLI args, assuming command line args -in and -out were given
    $options = Options->new_with_options;

    # now create a FIT test document, already configured for you
    $document = $options->make_document;


=head1 DESCRIPTION

A model of the FIT command line arguments.

=cut

